/**
 * 角色菜单关联表
 */
const RoleMenu = require("../model/role_menu");

module.exports = {
    findMenuByRoleId: async (params) => {
        return await RoleMenu.findAll({ where: params })
    },
    delMenuByRoleId: async (params) => {
        return await RoleMenu.destroy({ where: params })
    },
    create: async (params) => {
        console.log("role_menu dao:",params)
        return await RoleMenu.create(params)
    },
    update: async (params) => {
        return await RoleMenu.update(params, { where: { role_id: params.role_id } })
    }
}